package com.light.roller;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import org.anddev.andengine.audio.sound.Sound;
import org.anddev.andengine.audio.sound.SoundFactory;
import org.anddev.andengine.opengl.texture.Texture;
import org.anddev.andengine.opengl.texture.TextureOptions;
import org.anddev.andengine.opengl.texture.region.TextureRegion;
import org.anddev.andengine.opengl.texture.region.TextureRegionFactory;
import org.anddev.andengine.opengl.texture.region.TiledTextureRegion;
import org.anddev.andengine.ui.activity.BaseGameActivity;
import org.anddev.andengine.util.Debug;

public class ResourceManager 
{
	public static Map<String, TextureRegion> textureRegionMap = new HashMap<String, TextureRegion>();
	public static Map<String, TiledTextureRegion> tiledTextureRegionMap = new HashMap<String, TiledTextureRegion>();
	public static Map<String, Texture> textureMap = new HashMap<String, Texture>();
	public static Map<String, Integer> resourceUserCount = new HashMap<String, Integer>();
	public static Map<String, Sound> soundMap = new HashMap<String, Sound>();
	public static ArrayList<String> al = new ArrayList<String>();
	
	public static void clear(BaseGameActivity game)
	{
		for (int i = 0; i < al.size(); i++)
		{
			if (textureMap.get(al.get(i)) != null)
				game.getEngine().getTextureManager().unloadTexture(textureMap.get(al.get(i)));
		}
		textureRegionMap.clear();
		tiledTextureRegionMap.clear();
		textureMap.clear();
		resourceUserCount.clear();
		soundMap.clear();
		textureRegionMap = new HashMap<String, TextureRegion>();
		tiledTextureRegionMap = new HashMap<String, TiledTextureRegion>();
		textureMap = new HashMap<String, Texture>();
		resourceUserCount = new HashMap<String, Integer>();
		soundMap = new HashMap<String, Sound>();
	}
	
	
	public static void onLoadSoundResources(String string, BaseGameActivity game)
	{
		if (string == "BreakBox")
		{
			if (soundMap.get("BreakBox") == null)
			{
				Sound sound;
				SoundFactory.setAssetBasePath("Sound/");
				try {
					sound = SoundFactory.createSoundFromAsset(game.getEngine().getSoundManager(), 
							                                  game, 
							                                  "BreakableBox.ogg");
					soundMap.put(string, sound);
					resourceUserCount.put(string, 1);
				} catch (final IOException e) {
					Debug.e("Error", e);
				}
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "Box_Crack")
		{
			if (soundMap.get("Box_Crack") == null)
			{
				Sound sound;
				SoundFactory.setAssetBasePath("Sound/");
				try {
					sound = SoundFactory.createSoundFromAsset(game.getEngine().getSoundManager(), 
							                                  game, 
							                                  "Crack.ogg");
					soundMap.put(string, sound);
					resourceUserCount.put(string, 1);
				} catch (final IOException e) {
					Debug.e("Error", e);
				}
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "Gear")
		{
			if (soundMap.get("Gear") == null)
			{
				Sound sound;
				SoundFactory.setAssetBasePath("Sound/");
				try {
					sound = SoundFactory.createSoundFromAsset(game.getEngine().getSoundManager(), 
							                                  game, 
							                                  "Gear.ogg");
					soundMap.put(string, sound);
					resourceUserCount.put(string, 1);
				} catch (final IOException e) {
					Debug.e("Error", e);
				}
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "KillByJigsaw")
		{
			if (soundMap.get("KillByJigsaw") == null)
			{
				Sound sound;
				SoundFactory.setAssetBasePath("Sound/");
				try {
					sound = SoundFactory.createSoundFromAsset(game.getEngine().getSoundManager(), 
							                                  game, 
							                                  "Jigsaw.ogg");
					soundMap.put(string, sound);
					resourceUserCount.put(string, 1);
				} catch (final IOException e) {
					Debug.e("Error", e);
				}
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "Jump")
		{
			if (soundMap.get("Jump") == null)
			{
				Sound sound;
				SoundFactory.setAssetBasePath("Sound/");
				try {
					sound = SoundFactory.createSoundFromAsset(game.getEngine().getSoundManager(), 
							                                  game, 
							                                  "Jump.ogg");
					soundMap.put(string, sound);
					resourceUserCount.put(string, 1);
				} catch (final IOException e) {
					Debug.e("Error", e);
				}
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
	}
	
	public static void unLoadSoundResources(String string, BaseGameActivity game)
	{
		if (resourceUserCount.get(string) != null)
		{
			if (resourceUserCount.get(string) > 1)
			{
				Integer i = resourceUserCount.get(string) - 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
			else
			{
				resourceUserCount.remove(string);
				if (soundMap.get(string) != null)
				{
					soundMap.remove(string);
				}
			}
		}
	}
	
	
	public static void onLoadResources(String string, BaseGameActivity game)
	{
		al.add(string);
		if (string == "Player")
		{
			if (tiledTextureRegionMap.get("Player") == null)
			{
				Texture texture = new Texture(1024, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TiledTextureRegion textureRegion = TextureRegionFactory.createTiledFromAsset(texture, game, "Player.png", 0, 0, 20, 9);
				game.getEngine().getTextureManager().loadTexture(texture);
				tiledTextureRegionMap.put("Player", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "Panel")
		{
			if (tiledTextureRegionMap.get("Panel") == null)
			{
				Texture texture = new Texture(1024, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TiledTextureRegion textureRegion = TextureRegionFactory.createTiledFromAsset(texture, game, "Panel2.png", 0, 0, 11, 1);
				game.getEngine().getTextureManager().loadTexture(texture);
				tiledTextureRegionMap.put("Panel", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "RedLight")
		{
			if (textureRegionMap.get("RedLight") == null)
			{
				Texture texture = new Texture(64, 64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "RedLight.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("RedLight", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "RedLightGlow")
		{
			if (textureRegionMap.get("RedLightGlow") == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "RedLightGlow.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("RedLightGlow", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "safe")
		{
			if (textureRegionMap.get("safe") == null)
			{
				Texture texture = new Texture(128, 16, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "safe.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("safe", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BDSLogo")
		{
			if (textureRegionMap.get("BDSLogo") == null)
			{
				Texture texture = new Texture(1024, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "BDSLogo.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("BDSLogo", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "safe2")
		{
			if (textureRegionMap.get("safe2") == null)
			{
				Texture texture = new Texture(128, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "safe2.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("safe2", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "AnalogController")
		{
			if (textureRegionMap.get("AnalogControllerBase") == null || 
				textureRegionMap.get("AnalogControllerKnob") == null)
			{
				Texture texture = new Texture(256, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA); 
				TextureRegion textureRegionBase = TextureRegionFactory.createFromAsset(texture, game, "onscreen_control_base.png", 0, 0);
				TextureRegion textureRegionKnob = TextureRegionFactory.createFromAsset(texture, game, "onscreen_control_knob.png", 128, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("AnalogControllerBase", textureRegionBase);
				textureRegionMap.put("AnalogControllerKnob", textureRegionKnob);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "PanelLight")
		{
			if (tiledTextureRegionMap.get("PanelLight") == null)
			{
				Texture texture = new Texture(64, 64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TiledTextureRegion textureRegion = TextureRegionFactory.createTiledFromAsset(texture, game, "Light.png", 0, 0, 1, 1);
				game.getEngine().getTextureManager().loadTexture(texture);
				tiledTextureRegionMap.put("PanelLight", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "FormPanel")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(512, 512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "FormPanel.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("FormPanel", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "JumpButton")
		{
			if (textureRegionMap.get("JumpButton") == null)
			{
				Texture texture = new Texture(256, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TiledTextureRegion textureRegion = TextureRegionFactory.createTiledFromAsset(texture, game, "JumpButton.png", 0, 0, 2, 1);
				game.getEngine().getTextureManager().loadTexture(texture);
				tiledTextureRegionMap.put("JumpButton", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "JumpButtonGrey")
		{
			if (textureRegionMap.get("JumpButtonGrey") == null)
			{
				Texture texture = new Texture(128, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "JumpButtonGrey.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("JumpButtonGrey", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "FaceBox")
		{
			if (textureRegionMap.get("FaceBox") == null)
			{
				Texture texture = new Texture(64, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "face_box_tiled.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("FaceBox", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "CircleBox")
		{
			if (textureRegionMap.get("CircleBox") == null)
			{
				Texture texture = new Texture(128, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "face_circle_mid.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("CircleBox", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BreakStone")
		{
			if (textureRegionMap.get("BreakStone") == null)
			{
				Texture texture = new Texture(128, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "breakStone.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("BreakStone", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BigCircleBox")
		{
			if (textureRegionMap.get("BigCircleBox") == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "face_circle_big.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("BigCircleBox", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "testRock")
		{
			if (textureRegionMap.get("testRock") == null)
			{
				Texture texture = new Texture(128, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "box-01.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("testRock", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "Stage_2")
		{
			if (textureRegionMap.get("Stage_2") == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "Roller_2.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("Stage_2", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "smallRock")
		{
			if (textureRegionMap.get("smallRock") == null)
			{
				Texture texture = new Texture(64, 64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "box-02.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("smallRock", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "midRock")
		{
			if (textureRegionMap.get("midRock") == null)
			{
				Texture texture = new Texture(128, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "box-03.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("midRock", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "testStage1")
		{
			if (textureRegionMap.get("testStage1") == null)
			{
				Texture texture = new Texture(1024, 512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "testStage1.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("testStage1", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "PlayerGravityLight")
		{
			if (textureRegionMap.get("PlayerGravityLight") == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "PlayerGravityLight.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("PlayerGravityLight", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "Menu")
		{
			if (textureRegionMap.get("Menu") == null)
			{
				Texture texture = new Texture(1024, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "Menu.jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("Menu", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "ShadowCell")
		{
			if (textureRegionMap.get("ShadowCell") == null)
			{
				Texture texture = new Texture(32, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "ShadowCell.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("ShadowCell", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}else if (string == "ChainPart")
		{
			if (textureRegionMap.get("ChainPart") == null)
			{
				Texture texture = new Texture(64, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "chain_part.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("ChainPart", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "Door")
		{
			if (textureRegionMap.get("Door") == null)
			{
				Texture texture = new Texture(64, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "Door.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("Door", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "mainHead")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(32, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "mainBody1")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(32, 8, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S3")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_1")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S18")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S25")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S19")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S14")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S16")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S26")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S20")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S23")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S24")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S27")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S21")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_2")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_3")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_T1")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_T2")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S4")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S5")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S6")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S7")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S8")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S9")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S10")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S12")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S13")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S15")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S17")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "HeightCheck")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(1024, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TiledTextureRegion textureRegion = TextureRegionFactory.createTiledFromAsset(texture, game, "HeightCheck.png", 0, 0, 1, 1);
				game.getEngine().getTextureManager().loadTexture(texture);
				tiledTextureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "logo_S22")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "return")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(64, 64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "mainBody2")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(32, 8, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "mainHand1")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(16, 16, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "mainHand2")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(16, 16, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "mainLeg1")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(32, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "mainLeg2")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(32, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "breakStonePiece")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(32, 16, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_T2")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(1024, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_2")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_1")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S16")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S20")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_MainMenu")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S24")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S4_1")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(1024, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}else if (string == "BackGround_S4_2")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_3")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S14")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S18")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S25")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S19")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S12")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}else if (string == "BackGround_S22")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}else if (string == "BackGround_S21")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S26")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S27")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S6")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}	
		else if (string == "BackGround_S13")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S15")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S17")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S9")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S7")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S8")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S23")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S3")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S5")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_S10")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "smallGear")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(32, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "particle_point")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(32, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "particle_small_point")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(128, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "particle_fire")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(32, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "deathNeedle")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(32, 64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "DeathNeedle.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "ActionButton")
		{
			if (tiledTextureRegionMap.get("ActionButton") == null)
			{
				Texture texture = new Texture(1024, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TiledTextureRegion textureRegion = TextureRegionFactory.createTiledFromAsset(texture, game, "ActionButton.png", 0, 0, 7, 1);
				game.getEngine().getTextureManager().loadTexture(texture);
				tiledTextureRegionMap.put("ActionButton", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "SoundButton")
		{
			if (tiledTextureRegionMap.get("SoundButton") == null)
			{
				Texture texture = new Texture(256, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TiledTextureRegion textureRegion = TextureRegionFactory.createTiledFromAsset(texture, game, "SoundButton.png", 0, 0, 2, 1);
				game.getEngine().getTextureManager().loadTexture(texture);
				tiledTextureRegionMap.put("SoundButton", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "HeyzapButton")
		{
			if (tiledTextureRegionMap.get("HeyzapButton") == null)
			{
				Texture texture = new Texture(128, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TiledTextureRegion textureRegion = TextureRegionFactory.createTiledFromAsset(texture, game, "Heyzap.png", 0, 0, 1, 1);
				game.getEngine().getTextureManager().loadTexture(texture);
				tiledTextureRegionMap.put("HeyzapButton", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "MovingBar")
		{
			if (textureRegionMap.get("MovingBar") == null)
			{
				Texture texture = new Texture(256, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "moving_bar.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("MovingBar", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "MovingBar_V")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(32, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "moving_bar_v.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}else if (string == "MovingBar_b")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(512, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "moving_bar_b.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}else if (string == "MovingBar_bv")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(32, 512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "moving_bar_bv.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "ExitButton")
		{
			if (tiledTextureRegionMap.get("ExitButton") == null)
			{
				Texture texture = new Texture(128, 64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TiledTextureRegion textureRegion = TextureRegionFactory.createTiledFromAsset(texture, game, "Exit.png", 0, 0, 2, 1);
				game.getEngine().getTextureManager().loadTexture(texture);
				tiledTextureRegionMap.put("ExitButton", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "Form1")
		{
			if (textureRegionMap.get("Form1") == null)
			{
				Texture texture = new Texture(1024, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "Form1.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("Form1", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "ReturnButton")
		{
			if (textureRegionMap.get("ReturnButton") == null)
			{
				Texture texture = new Texture(512, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "ReturnButton.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("ReturnButton", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "ResetButton")
		{
			if (textureRegionMap.get("ResetButton") == null)
			{
				Texture texture = new Texture(512, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "ResetButton.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("ResetButton", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackToMenu")
		{
			if (textureRegionMap.get("BackToMenu") == null)
			{
				Texture texture = new Texture(512, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "BackToMenu.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("BackToMenu", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "RightButton")
		{
			if (textureRegionMap.get("RightButton") == null)
			{
				Texture texture = new Texture(256, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TiledTextureRegion textureRegion = TextureRegionFactory.createTiledFromAsset(texture, game, "RightButton.png", 0, 0, 2, 1);
				game.getEngine().getTextureManager().loadTexture(texture);
				tiledTextureRegionMap.put("RightButton", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "RightButtonGrey")
		{
			if (textureRegionMap.get("RightButtonGrey") == null)
			{
				Texture texture = new Texture(128, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "RightButtonGrey.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("RightButtonGrey", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "LeftButton")
		{
			if (textureRegionMap.get("LeftButton") == null)
			{
				Texture texture = new Texture(256, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TiledTextureRegion textureRegion = TextureRegionFactory.createTiledFromAsset(texture, game, "LeftButton.png", 0, 0, 2, 1);
				game.getEngine().getTextureManager().loadTexture(texture);
				tiledTextureRegionMap.put("LeftButton", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "LeftButtonGrey")
		{
			if (textureRegionMap.get("LeftButtonGrey") == null)
			{
				Texture texture = new Texture(128, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "LeftButtonGrey.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("LeftButtonGrey", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BackGround_T1")
		{
			if (textureRegionMap.get("BackGround_T1") == null)
			{
				Texture texture = new Texture(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "BackGround_T1.jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put("BackGround_T1", textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "Black")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(32, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "Black.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "AndLogo")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(128, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "AndengineLogo.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "FanInside")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(64, 64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "FanInside.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "FanOutside")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(64, 64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "FanOutside.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BigMenuTest")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048,512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "BigMenuTest.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "BigMenuTest2")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048,512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "BigMenuTest2.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "GlobalBall")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(512,512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "globalBall.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "smallWorld1")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256,128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, string+".png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "GlobalWorld1")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256,256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "world1.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "GlobalWorld2")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(512,512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "world2.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "GlobalWorld2s")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(512,512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "world2-stone.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "GlobalWorld3")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256,256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "world3.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "GlobalWorld3s")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256,256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "world3-stone.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "GlobalStartArrow")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256,256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "startArrow.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "Yellowgear")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256,256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "Yellowgear.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "StartButton")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(256,256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "StartButton.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
		else if (string == "SmallYellowgear")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(64,64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "SmallYellowgear.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}else if (string == "BigMenuWorld1")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(1024,512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "BigMenuWorld1.jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}else if (string == "lockedSpot")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(64,64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "lockedSpot.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}else if (string == "world1OpenSpot")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(64,64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "world1OpenSpot.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}else if (string == "world2OpenSpot")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(64,64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "world2OpenSpot.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}else if (string == "world3OpenSpot")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(64,64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "world3OpenSpot.png", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}else if (string == "BigMenuWorld2")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048,512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "BigMenuWorld2.jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}else if (string == "BigMenuWorld3")
		{
			if (textureRegionMap.get(string) == null)
			{
				Texture texture = new Texture(2048,512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
				TextureRegion textureRegion = TextureRegionFactory.createFromAsset(texture, game, "BigMenuWorld3.jpg", 0, 0);
				game.getEngine().getTextureManager().loadTexture(texture);
				textureRegionMap.put(string, textureRegion);
				textureMap.put(string, texture);
				resourceUserCount.put(string, 1);
			}
			else
			{
				Integer i = resourceUserCount.get(string) + 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
		}
	}
	
	public static void unLoadResources(String string, BaseGameActivity game)
	{

		if (string == "AnalogController")
		{
			if (resourceUserCount.get(string) != null && resourceUserCount.get(string) > 1)
			{
				Integer i = resourceUserCount.get(string) - 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
			else if (resourceUserCount.get(string) != null)
			{
				resourceUserCount.remove(string);
				textureRegionMap.remove("AnalogControllerBase");
				textureRegionMap.remove("AnalogControllerKnob");
				Texture temp = textureMap.get(string);
				textureMap.remove(string);
				game.getEngine().getTextureManager().unloadTexture(temp);
			}
		}
		else if (resourceUserCount.get(string) != null)
		{
			if (resourceUserCount.get(string) > 1)
			{
				Integer i = resourceUserCount.get(string) - 1;
				resourceUserCount.remove(string);
				resourceUserCount.put(string, i);
			}
			else
			{
				resourceUserCount.remove(string);
				if (tiledTextureRegionMap.get(string) != null)
					tiledTextureRegionMap.remove(string);
				else if (textureRegionMap.get(string) != null)
					textureRegionMap.remove(string);
				
				if (textureMap.get(string) != null)
				{
					Texture temp = textureMap.get(string);
					textureMap.remove(string);
					game.getEngine().getTextureManager().unloadTexture(temp);
				}
			}
		}
	}
	
	public static TiledTextureRegion getTiledTextureRegion(String string)
	{
		return tiledTextureRegionMap.get(string).clone();
	}
	
	public static TextureRegion getTextureRegion(String string)
	{
		return textureRegionMap.get(string).clone();
	}
	
	public static Sound getSound(String string)
	{
		return soundMap.get(string);
	}
	
	public static void onStop()
	{
		textureRegionMap.clear();
		tiledTextureRegionMap.clear();
	}
	
	public static void unLoadAllSounds()
	{
		soundMap.clear();
	}
}
